#include "stdafx.h"

#include "droplet.h"

Droplet::Droplet( CircleShape *pShape )
{
    mShape = pShape;
}

Droplet::~Droplet( void )
{
}

void Droplet::Render( void )
{
    Vector2 &position = mShape->GetPosition();
    float r = mShape->GetRadius();

    glLoadIdentity();
    glTranslatef( position.x - r, position.y - r, 0.1f );

    glScalef( r, r, 1.0f );

    glBegin( GL_QUADS );
        glTexCoord2f( 0.0f, 0.0f ); glVertex3f( -1.0f, -1.0f, 0.0f );
        glTexCoord2f( 1.0f, 0.0f ); glVertex3f(  1.0f, -1.0f, 0.0f );
        glTexCoord2f( 1.0f, 1.0f ); glVertex3f(  1.0f,  1.0f, 0.0f );
        glTexCoord2f( 0.0f, 1.0f ); glVertex3f( -1.0f,  1.0f, 0.0f );
    glEnd();
}
